#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#There are two options with file names:
#  1. hadoop-metrics2-[prefix].properties
#  2. hadoop-metrics2.properties
# Either will be loaded by the metrics system (but not both).
#
# NOTE: The metrics system is only initialized once per JVM (but does ref-counting, so we can't
#shutdown and restart), so we only load the first prefix that we find. Generally, this will be
# ratis_log_service_metadata/ratis_log_service/ratis (unless someone else registers first, but for many clients, there should only be one).
#
# Usually, you would use hadoop-metrics2-phoenix.properties, but we use the generic
# hadoop-metrics2.properties to ensure it these are loaded regardless of where we are running,
# assuming there isn't another config on the classpath.

#
# When specifying sinks, the syntax to use is:
#    [prefix].[source|sink].[instance].[options]
# See javadoc of package-info.java for org.apache.hadoop.metrics2 for detail
ratis.source.start_mbeans=true
#*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31
#ratis.sink.ganglia.servers=ganglia.logservice.ratis.org:8649
#ratis_log_service_metadata.sink.ganglia.servers=ganglia.logservice.ratis.org:8649
#ratis_log_service.sink.ganglia.servers=ganglia.logservice.ratis.org:8649

*.sink.graphite.class=org.apache.hadoop.metrics2.sink.GraphiteSink
ratis.sink.graphite.server_host=graphite.logservice.ratis.org
ratis.sink.graphite.server_port=2003
ratis.sink.graphite.metrics_prefix=ratis

*.sink.file.class=org.apache.hadoop.metrics2.sink.FileSink
ratis.sink.file.filename=/tmp/ratis-metrics.out



#ratis_log_service.sink.graphite.server_host=graphite.logservice.ratis.org
#ratis_log_service.sink.graphite.server_port=2003
#ratis_log_service.sink.graphite.metrics_prefix=ratis_log_Service
# Frequency, in seconds, of sampling from the sources
*.period=10
